﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PacMan
{
    public partial class LeaderBoardForm : Form
    {
        private LeaderboardManager _leaderboardManager = new LeaderboardManager();
        
        
        public LeaderBoardForm()
        {
            InitializeComponent();
        }

        private void LeaderBoard_Paint(object sender, PaintEventArgs e)
        {
            var topPlayers = _leaderboardManager.GetTopPlayers();
            int change = 20;
            int y = 0;
            foreach(var player in topPlayers)
            {
                e.Graphics.DrawString(player, new Font("Quartz MS", 18), Brushes.White, 0, y);
                y += change;
            }
        }
    }
}
